/*
 * Ethan Levine
 * 
 * The contents of this file are subject to the GNU General Public
 * License (GPL) v2.  The full contents of this license can be
 * found at Mathma's website, http://www.codeplex.com/mathma/license
 */
package mathma.core.real;

import mathma.core.expr.*;
import java.math.BigDecimal;

/**
 * @since 0.1.0
 * @author Ethan Levine
 */
public class IndeterminateReal extends Real {

    public static final IndeterminateReal INF_OVER_INF =
            new IndeterminateReal(Reason.INF_OVER_INF);
    public static final IndeterminateReal INF_MINUS_INF =
            new IndeterminateReal(Reason.INF_MINUS_INF);
    public static final IndeterminateReal ZERO_OVER_ZERO =
            new IndeterminateReal(Reason.ZERO_OVER_ZERO);
    public static final IndeterminateReal INDETERMINATE_OPERATOR =
            new IndeterminateReal(Reason.INDETERMINATE_OPERATOR);
    public static final IndeterminateReal INDETERMINATE_RANGE =
            new IndeterminateReal(Reason.INDETERMINATE_RANGE);
    public static final IndeterminateReal UNKNOWN_SIGN =
            new IndeterminateReal(Reason.UNKNOWN_SIGN);
    public static final IndeterminateReal OUT_OF_DOMAIN =
            new IndeterminateReal(Reason.OUT_OF_DOMAIN);
    public static final IndeterminateReal ZERO_TO_ZERO_POWER =
            new IndeterminateReal(Reason.ZERO_TO_ZERO_POWER);
    private Reason reason;

    private IndeterminateReal(Reason reason) {
        this.reason = reason;
    }

    public Reason getReason() {
        return reason;
    }

    @Override
    public boolean equals(Object other) {
        return false;
    }

    public boolean isNegative() {
        return false;
    }

    public boolean isPositive() {
        return false;
    }

    public boolean isInteger() {
        return false;
    }

    public double doubleValue() {
        return Double.NaN;
    }

    public float floatValue() {
        return Float.NaN;
    }

    public long longValue() {
        throw new UnknownValueException("long cannot represent NaN.");
    }

    public byte byteValue() {
        throw new UnknownValueException("byte cannot represent NaN.");
    }

    public short shortValue() {
        throw new UnknownValueException("short cannot represent NaN.");
    }

    public int intValue() {
        throw new UnknownValueException("int cannot represent NaN.");
    }

    public BigDecimal bigDecimalValue() {
        return new BigDecimal(Double.NaN);
    }

    public boolean isIndeterminate() {
        return true;
    }

    public boolean isInfinite() {
        return false;
    }

    public boolean isFinite() {
        return false;
    }

    public boolean isLessThan(Real other) {
        return false;
    }

    public boolean isGreaterThan(Real other) {
        return false;
    }

    public Real negate() {
        return INDETERMINATE_OPERATOR;
    }

    public Real absoluteValue() {
        return INDETERMINATE_OPERATOR;
    }

    public Real floor() {
        return INDETERMINATE_OPERATOR;
    }

    public Real ceiling() {
        return INDETERMINATE_OPERATOR;
    }

    public Real truncate() {
        return INDETERMINATE_OPERATOR;
    }

    public Real round() {
        return INDETERMINATE_OPERATOR;
    }

    public Real add(Real operand) {
        return INDETERMINATE_OPERATOR;
    }

    public Real subtract(Real operand) {
        return INDETERMINATE_OPERATOR;
    }

    public Real multiply(Real operand) {
        return INDETERMINATE_OPERATOR;
    }

    public Real divideBy(Real denominator) {
        return INDETERMINATE_OPERATOR;
    }

    public Real sine() {
        return INDETERMINATE_OPERATOR;
    }

    public Real cosine() {
        return INDETERMINATE_OPERATOR;
    }

    public Real tangent() {
        return INDETERMINATE_OPERATOR;
    }

    public Real secant() {
        return INDETERMINATE_OPERATOR;
    }

    public Real cosecant() {
        return INDETERMINATE_OPERATOR;
    }

    public Real cotangent() {
        return INDETERMINATE_OPERATOR;
    }

    public Real invSine() {
        return INDETERMINATE_OPERATOR;
    }

    public Real invCosine() {
        return INDETERMINATE_OPERATOR;
    }

    public Real invTangent() {
        return INDETERMINATE_OPERATOR;
    }

    public Real invSecant() {
        return INDETERMINATE_OPERATOR;
    }

    public Real invCosecant() {
        return INDETERMINATE_OPERATOR;
    }

    public Real invCotangent() {
        return INDETERMINATE_OPERATOR;
    }

    public Real hyperSine() {
        return INDETERMINATE_OPERATOR;
    }

    public Real hyperCosine() {
        return INDETERMINATE_OPERATOR;
    }

    public Real hyperTangent() {
        return INDETERMINATE_OPERATOR;
    }

    public Real hyperSecant() {
        return INDETERMINATE_OPERATOR;
    }

    public Real hyperCosecant() {
        return INDETERMINATE_OPERATOR;
    }

    public Real hyperCotangent() {
        return INDETERMINATE_OPERATOR;
    }

    public Real invHyperSine() {
        return INDETERMINATE_OPERATOR;
    }

    public Real invHyperCosine() {
        return INDETERMINATE_OPERATOR;
    }

    public Real invHyperTangent() {
        return INDETERMINATE_OPERATOR;
    }

    public Real invHyperSecant() {
        return INDETERMINATE_OPERATOR;
    }

    public Real invHyperCosecant() {
        return INDETERMINATE_OPERATOR;
    }

    public Real invHyperCotangent() {
        return INDETERMINATE_OPERATOR;
    }

    public Real factorial() {
        return INDETERMINATE_OPERATOR;
    }

    public Real modulo(Real modulus) {
        return INDETERMINATE_OPERATOR;
    }

    public Real exp() {
        return INDETERMINATE_OPERATOR;
    }

    public Real ln() {
        return INDETERMINATE_OPERATOR;
    }

    public Real sqrt() {
        return INDETERMINATE_OPERATOR;
    }

    public Real power(Real exponent) {
        return INDETERMINATE_OPERATOR;
    }

    public static enum Reason {

        INF_OVER_INF,
        INF_MINUS_INF,
        ZERO_OVER_ZERO,
        INDETERMINATE_OPERATOR,
        INDETERMINATE_RANGE,
        UNKNOWN_SIGN,
        OUT_OF_DOMAIN,
        ZERO_TO_ZERO_POWER;
    }
}
